<#assign base=request.contextPath>
<!DOCTYPE html> 
<html>
	<head>
		<title></title>
		<meta charset="utf-8">
		<#include "common/reference.ftl" />
		<#include "common/ligerui.ftl" />
		<script type="text/javascript">
		<!--
			var ligerTable = null;
			$(function(){
				ligerTable = $('#table').ligerGrid({
					width:'98%',
					enabledSort:false,
					pageSizeOptions:[5,10,20,50,100,200],
					height:'auto',
					alternatingRow:true,
					url:'${base}/user/getList',
					pageSize:20,
					columns:[
						{display:'openId',name:'openId',id:'openId',align:'center',minWidth:250},
						{display:'昵称',name:'nickName',id:'nickName',align:'center'},
						{display:'用户名',name:'phoneNo',id:'phoneNo',align:'center'},
						/*
						{display:'余额',name:'balance',id:'balance',align:'center'},
						*/
						{
							display:'注册时间',
							name:'registerTime',
							id:'registerTime',
							align:'center',
							width:180,
							render:function(row){
								var registerTime = row.registerTime;
								if(registerTime > 0){
									return formatDate(registerTime*1000);
								}
								return '-';
							}
						},
						{
							display:'状态',
							name:'status',
							id:'status',
							align:'center',
							render:function(row){
								var status = row.status;
								if(status = 1){
									return '登录';
								}
								else if(status = 2){
									return '退出';
								}
								else{
									return '－';
								}
							}
						},
						
						{
							display:'是否启用',
							name:'enabled',
							id:'enabled',
							align:'center',
							render:function(row){
								var enabled = row.enabled;
								if(enabled){
									return '是';
								}
								return '否';
							}
						}
						/*
						,
						{
							display:'操 作',
							align:'center',
							render:function(row){
								var phoneNo = row.phoneNo;
								return [
										'<a class="edit" href="javascript:void(0)" onclick="recharge('+phoneNo+')"  title="充值">',
							                '<i class="fa fa-jpy"></i>充值',
							            '</a>'
							            ].join('');
							}
						}
						*/
					]
				});
				$('#btnSearch').click(function(){
					if(ligerTable){
						var searchKey = $('#txtSearchKey').val();
						ligerTable.setParm('searchKey',searchKey);
						ligerTable.reload();
					}
				});
			});
		    function recharge(phoneNo){
	        	var url='${base}/user/recharge?phoneNo='+phoneNo;
	            changePage(url);
		    }
		//-->
		</script>
	</head>
	<body>
		
		<#include "common/breadcrumb.ftl">
		
		<div class="widget-box">
			<div class="widget-header">
				<h5 class="lighter">查询</h5>
			</div>
			<div class="widget-body">
				<div class="widget-main">
					<div class="row">
						<div class="col-sm-4">
							<div class="input-group">
								<input id="txtSearchKey" type="text" class="form-control search-query" placeholder="请输关键字" />
								<span class="input-group-btn">
									<button id="btnSearch" type="button" class="btn btn-purple btn-sm">
										查询
										<i class="icon-search icon-on-right bigger-110"></i>
									</button>
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="widget-box">
			<div class="widget-header">
				<h5 class="lighter">
					<i class="icon-table"></i>
					用户列表
				</h5>
			</div>
			<div class="widget-body">
				<div id="table"><div>
			</div>
		</div>
	</body>
</html>